#ifndef TESTSCENE_H
#define TESTSCENE_H

#include "EGG/EGG.h"
using namespace egg;
using namespace cv;

class TestScene{
public:
    void init(){
        mWidth=800,mHeight=600;
        mRenderer=Renderer::getSingletonPtr();
        mScene=new Scene();
        mRootNode=mScene->getRootNode();

        setupGUI();
        setupCamera();
        setupDisplay();
    }

    virtual void render(){}
    virtual void onKeyboard(unsigned char kc,int x,int y){}
    virtual void onMouseDown(int button,int x,int y){}
    virtual void onMouseUp(int button,int x,int y){}
    virtual void onMouseDrag(int button,int x,int y){}
    virtual void onMouseMove(int x,int y){}

    inline int getWidth(){
        return mWidth;
    }
    inline int getHeight(){
        return mHeight;
    }
    inline float getFPS(){
        return 1.0f/(mRenderer->getFrameEvent().mInterval);
    }
protected:
    virtual void setupGUI(){}
    virtual void setupCamera(){}
    virtual void setupDisplay(){}
protected:
    int mWidth,mHeight;
    RendererPtr mRenderer;
    SceneNode* mRootNode;
    Scene* mScene;
};

#endif